package zj.xinxin.business.business.articale.converter;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import zj.xinxin.api.moudle.article.dto.ArticleDto;
import zj.xinxin.api.moudle.article.entity.ArticleEntity;
import zj.xinxin.api.moudle.article.entity.TagEntity;
import zj.xinxin.api.moudle.article.vo.ArticleUpdateVo;
import zj.xinxin.api.moudle.article.vo.ArticleVo;
import zj.xinxin.api.moudle.article.vo.TagVo;

/**
 * @author junzhou
 * @date 2022/4/13 11:01
 * @since 1.8
 */
@Mapper(componentModel = "spring")
public interface ArticleConverter {

    ArticleConverter INSTANCE = Mappers.getMapper(ArticleConverter.class);

    ArticleEntity toEntity(ArticleVo article);

    ArticleDto toDto(ArticleEntity entity);
    
    ArticleEntity toEntity(ArticleUpdateVo updateVo);
}
